package cn.com.generaldata.os.exportpojo;

import java.util.HashSet;
import java.util.Set;

import com.sun.xml.internal.bind.CycleRecoverable;

/**
 * 乡村级别行政区划
 * 
 * @author Administrator
 * 
 */
public class LArea implements java.io.Serializable, CycleRecoverable {

	private static final long serialVersionUID = -6404314064704214469L;

	private String id; // 行政区划Id
	private String lareaName; // 行政区划中文名称
	private String lareaDesc; // 行政区划拼音描述
	private String lareaCode; // 行政区划代码
	private String lareaZimuCode; // 行政区划拼音字头
	private String parentId; // 上级ID
	private Set<Unit> units = new HashSet<Unit>(0);
	private Set<Unit> registUnits = new HashSet<Unit>(0);

	public LArea() {
	}

	public Set<Unit> getRegistUnits() {
		return registUnits;
	}

	public void setRegistUnits(Set<Unit> registUnits) {
		this.registUnits = registUnits;
	}

	public Set<Unit> getUnits() {
		return units;
	}

	public void setUnits(Set<Unit> units) {
		this.units = units;
	}

	public LArea(String id, String lareaName, String lareaCode) {
		this.id = id;
		this.lareaName = lareaName;
		this.lareaCode = lareaCode;
	}

	public LArea(String id, String areaName, String areaDesc, String areaCode, String areaZimuCode, String parentId,
			Set<Unit> units, Set<Unit> registUnits) {
		this.id = id;
		this.lareaName = areaName;
		this.lareaDesc = areaDesc;
		this.lareaCode = areaCode;
		this.lareaZimuCode = areaZimuCode;
		this.parentId = parentId;
		this.units = units;
		this.registUnits = registUnits;
	}

	/**
	 * 解决CXF循环引用问题.
	 * 
	 * @param arg0
	 * @return
	 */
	@Override
	public Object onCycleDetected(Context arg0) {
		LArea temp = new LArea();
		temp.setId(id);
		return temp;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLareaName() {
		return lareaName;
	}

	public void setLareaName(String lareaName) {
		this.lareaName = lareaName;
	}

	public String getLareaDesc() {
		return lareaDesc;
	}

	public void setLareaDesc(String lareaDesc) {
		this.lareaDesc = lareaDesc;
	}

	public String getLareaCode() {
		return lareaCode;
	}

	public void setLareaCode(String lareaCode) {
		this.lareaCode = lareaCode;
	}

	public String getLareaZimuCode() {
		return lareaZimuCode;
	}

	public void setLareaZimuCode(String lareaZimuCode) {
		this.lareaZimuCode = lareaZimuCode;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

}
